<%@page import="com.webmining.sherlock.admin.Manager" %>

<%@page import="com.webmining.sherlock.util.search.Constants" %>
<%@page import="java.net.URL" %>

<%
    String website = request.getParameter("website");
    String update = request.getParameter("update");

    Manager.setDefaultInitialPage(new URL(website), application);
    if ("daily".equals(update)) {
        Manager.scheduleCrawling(24);
    } else {
        Manager.scheduleCrawling(24 * 7);
    }
%>

<html>
<head>
    <title>Sherlock Admin</title>

    <link rel="stylesheet" href="/css/admin.css" type="text/css"/>
</head>
<body>
<h3 class="welcome-header">Sherlock <%= Constants.SHERLOCK_RELEASE %> is running now !</h3>

<p>Depending on the website content size, the index time may take
    a few minutes or couple of hours.
    <br/>
    You can do some queries as Sherlock is indexing web pages at the
    <a href="/">search page</a>.</p>
</body>
</html>
